package com.company._引入;

import java.io.FileInputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.Properties;

public class Main {

    public static void main(String[] args) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException {
	// read setting
        Properties p=new Properties();
        p.load(new FileInputStream("round1.txt"));
        String name="com.company._引入."+p.getProperty("name");
        System.out.println(name);

    //loading setting
        Monster m=null;
//        if("SmallMonster".equals(name)){
//            m=new SmallMonster();
//        }
//        else if("SuperMonster".equals(name)){
//            m=new SuperMonster();
//        }
//        else if("BossMonster".equals(name)){
//            m=new BossMonster();
//        }

       Class c=Class.forName(name);
       m=(Monster)c.getDeclaredConstructor().newInstance();

    }
}
